
package com.eshore.ezone.utils;

import android.app.Activity;

import java.util.ArrayList;

public class ActivityStackManager {
    private static ArrayList<Activity> sActivityList = new ArrayList<Activity>();

    public static void remove(Activity activity) {
        sActivityList.remove(activity);
    }

    public static void add(Activity activity) {
        sActivityList.add(activity);
    }

    public static void finish() {
        for (Activity activity : sActivityList) {
            activity.finish();
        }
        android.os.Process.killProcess(android.os.Process.myPid());
    }
}
